package cn.kgc.watch.web;

import cn.kgc.watch.entity.Carousel;
import cn.kgc.watch.service.CarouselService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
/**
 * 轮播图
 */
@CrossOrigin
public class CarouselController {
    @Resource
    private CarouselService carouselService;
    @GetMapping("findCarousel")
    public List<Carousel> findCarousel(){
        return this.carouselService.findCarousels();
    }
}
